﻿/*******************************************************************************
 * Copyright © 2016-2020 北京网非科技有限公司 版权所有
 * Author: 北京网非科技有限公司
 * Description: 网非快速开发平台NET
 * Website：http://www.wfdot.com
*********************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CubicFWNet.Data.SystemManage.Model
{
    [Table("Item")]
    public partial class Item
    {
        public Item()
        {
            this.Id = Guid.Empty;
            this.CategoryId = Guid.Empty;
            this.Name = string.Empty;
            this.CreateTime = DateTime.Now;            
            this.SortNo = 0;
        }
        
        [Key]
        [DisplayName("主键")]
        public System.Guid Id { get; set; }

        [Index("IX_CategoryId_Item", IsClustered = false)]
        [DisplayName("所属分类")]
        public System.Guid CategoryId { get; set; }

        [Index("IX_Name_Item", IsClustered = false, IsUnique = true)]
        [DisplayName("名称")]
        [Required]
        [MaxLength(50, ErrorMessage = "最多只能输入50个字符")]
        [Column(TypeName = "nvarchar")]
        public string Name { get; set; }

        [DisplayName("创建时间")]
        public System.DateTime CreateTime { get; set; }

        public System.Guid CreatorId { get; set; }

        [DisplayName("排序号")]
        [Required]
        [DefaultValue(0)]
        public int SortNo { get; set; }

        [DisplayName("备注")]
        [MaxLength(1024, ErrorMessage = "最多只能输入1024个字符")]
        [Column(TypeName = "nvarchar")]
        public string Memo { get; set; }
    }
}
